using CodePlex.TfsLibrary.Utility;

namespace CodePlex.CodePlexClientLibrary
{
    [Command("clearcache", "Clears cached credentials", MaxArgs = 0)]
    public class ClearCacheCommand : Command
    {
        readonly ICredentialsCache credentialsCache;

        public ClearCacheCommand(ICredentialsCache credentialsCache)
        {
            this.credentialsCache = credentialsCache;
        }

        public override void Execute()
        {
            credentialsCache.Clear();
        }
    }
}